package com.itasura.jwt.service;

import com.itasura.jwt.entity.User;
import com.itasura.jwt.mapper.UserMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author sailor wang
 * @date 2019/1/22 3:15 PM
 * @description
 */

@Service("UserService")
public class UserService {
    @Autowired
    UserMapper userMapper;

    public User findByUsername(User user) {
        return userMapper.findByUsername(user.getUsername());
    }

    public User findUserById(Long userId) {
        return userMapper.findUserById(userId);
    }

}